package testing;

public class Test {

	public static void main(String [] args) {
		
		Bank a = new Bank(3, 500);
		
		TransferThread t1 = new TransferThread(a,50,"bucha");
		TransferThread t2 = new TransferThread(a,50,"estica");
		TransferThread t3 = new TransferThread(a,50,"maria");
		TransferThread t4 = new TransferThread(a,50,"manel");
		
		System.out.println("comecou");
		t1.start();
		t2.start();
		t3.start();
		t4.start();
		try {
			t1.join();
			t2.join();
			t3.join();
			t4.join();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("Conta 1: "+a.getAccount(1).getBalance());
		System.out.println("Conta 2: "+a.getAccount(2).getBalance());
		System.out.println("acabou");
		
		
		
		
		
		
	}
	
	
}
